*******************************************************************************************************************
REPLICATION PACKAGE
Article: "Turnover: How lame-duck governments disrupt the bureaucracy and service delivery before leaving office"
Author: Guillermo Toral
Contact information: guillermo.toral@ie.edu / www.guillermotoral.com
Date: July 2023
*******************************************************************************************************************

This package contains all data and code necessary to replicate the tables and figures in the main text of the article and in its online appendices.

All data analyses in this article were carried out using R (version 4.2.1) on a Mac computer (MacOS 12.1). The versions of the R packages used are indicated at the end of the corresponding code files.

The structure and contents of this replication package are as follows:

	- code: folder with R code files
		- analyze_data: folder with code files that implement analyses
			- analyze_data_descriptives.R: code that implements the descriptive analyses
			- analyze_data_rdd.R: code that implements the regression discontinuity design analyses
		- prepare_data: folder with code files that prepare the analysis datasets included under datasets > analysis
			- prepare_data_elections.R: code that prepares the elections dataset
			- prepare_data_employment.R: code that prepares the employment datasets
			- prepare_data_healthcare.R: code that prepares the healthcare dataset
			- prepare_data_merge_datasets.R: code that prepares the analysis dataset by merging other datasets, and generates codebooks for the analysis dataset and for transitions_around_the_world.csv
			- prepare_data_mpsp_news.R: code that prepares the dataset on news in the site of the São Paulo Prosecutor's Office, and generates a codebook for mpsp_news_coded.csv 
	- datasets: folder with datasets and (for analysis datasets) codebooks
		- analysis: folder with analyses datasets.
			- analysis_dataset_all_employees.csv: analysis dataset with municipal employment counts for all employees
			- analysis_dataset_education_employees.csv: analysis dataset with municipal employment counts for education employees
			- analysis_dataset_healthcare_employees.csv: analysis dataset with municipal employment counts for healthcare employees
			- analysis_dataset_highpay_employees.csv: analysis dataset with municipal employment counts for high-pay employees
			- analysis_dataset_lowpay_employees.csv: analysis dataset with municipal employment counts for low-pay employees
			- analysis_dataset_managers_employees.csv: analysis dataset with municipal employment counts for manager employees
			- analysis_dataset_nonmanagers_employees.csv: analysis dataset with municipal employment counts for non manager employees
			- codebooks: folder with codebooks for the analysis datasets
				- codebook_analysis_dataset.pdf: codebook for the analysis datasets (it works for all datasets listed above, which are the unes used by the files analyze_data_descriptives.R and analyze_data_rdd.R)
				- codebook_mpsp_news_dataset.pdf: codebook for mpsp_news_coded.csv
				- codebook_transitions_dataset.pdf: codebook for transitions_around_the_world.csv
			- election_data.csv: dataset with election variables for the cycles 2004, 2008, 2012 and 2016
			- employment_all_data.csv: dataset with employment variables for all municipal employees
			- employment_education_data.csv: dataset with employment variables for education municipal employees
			- employment_healthcare_data.csv: dataset with employment variables for healthcare municipal employees
			- employment_highpay_data.csv: dataset with employment variables for high-pay municipal employees
			- employment_lowpay_data.csv: dataset with employment variables for low-pay municipal employees
			- employment_managers_data.csv: dataset with employment variables for managers municipal employees
			- employment_nonmanagers_data.csv: dataset with employment variables for non-managers municipal employees
			- healthcare_data.csv: dataset with municipal healthcare service counts
			- mpsp_news_coded.csv: dataset with news in the site of the Sao Paulo Prosecutor's Office
			- transitions_around_the_world.csv: dataset with dates and duration of recent transition periods (between an electoral defeat and the elected official taking office) in 20 democracies
		- downloaded: folder with datasets downloaded from the internet. Instructions on how to download them, and full citations, are included at the end of this file.
			- elections: folder with a dataset from the site of the Tribunal Supremo Eleitoral or Supreme Electoral Court, which manages elections in Brazil.
				- tse_elections_2000_to_2016.RData: file with data on the candidates (and their electoral performance) in Brazilian elections from 2000 to 2016. 
			- employment: folder with employment datasets, produced by the Ministry of the Economy / Labor
				- codebooks: folder with codebooks for the original RAIS datasets
					- Ministerio Economia_2005_Manual orientação da RAIS.pdf: RAIS codebook from 2005
					- Ministerio Economia_2019_Manual orientação da RAIS.pdf: RAIS codebook from 2019
					- RAIS_vinculos_layoutmicrodadosAPARTIR2014.xls: RAIS codebook covering the period 2014 onward
				- rais_processed: folder with datasets with counts for municipal employment
					- rais_municipal_employees_2004.csv: dataset with counts on municipal employment in 2004
					- rais_municipal_employees_2005.csv: dataset with counts on municipal employment in 2005
					- rais_municipal_employees_2008.csv: dataset with counts on municipal employment in 2008
					- rais_municipal_employees_2009.csv: dataset with counts on municipal employment in 2009
					- rais_municipal_employees_2012.csv: dataset with counts on municipal employment in 2012
					- rais_municipal_employees_2013.csv: dataset with counts on municipal employment in 2013
					- rais_municipal_employees_2016.csv: dataset with counts on municipal employment in 2016
					- rais_municipal_employees_2017.csv: dataset with counts on municipal employment in 2017
			- healthcare: folder with healthcare datasets, produced by the Ministry of Healthcare
				- cnes: folder with datasets from the National Registry of Healthcare Establishments (CNES)
					- cnes_personnel_all_2007-15.csv: dataset with counts of municipal healthcare staff between 2007 and 2015
					- cnes_personnel_all_2015-21.csv: dataset with counts of municipal healthcare staff between 2015 and 2021
				- codebooks: folder with codebooks for the healthcare datasets
					- cnes_codebook.pdf: codebook for the CNES datasets
					- siab_births_codebook.pdf: codebook for the SIAB datasets on births
					- siab_cadastramento_familiar_codebook.pdf: codebook for the SIAB family registration datasets
					- siab_producao_e_marcadores_codebook.pdf: codebook for the SIAB production and indicators datasets
					- siab_situacao_saude_codebook.pdf: codebook for the SIAB health situation datasets
				- siab: folder with datasets from the Basic Assistance Information System (SIAB):
					- siab_babies_below1yr.csv: dataset with counts of infants 0-1 year old
					- siab_births.csv: dataset with counts of births
					- siab_consultations_children.csv: dataset with counts of medical consultations with children (1-5 years old)
					- siab_consultations_infants.csv: dataset with counts of medical consultations with infants (0-1 year old)
					- siab_lifebirths_weight_below_2500g.csv: dataset with counts of underweight (< 2,500 grams) births
					- siab_pregnancies_vaccinations.csv: dataset with counts of pregnant women with their vaccines up to date
					- siab_prenatal.csv: dataset with counts of prenatal care checkups
					- siab_vaccinations_0-1.csv: dataset with counts of infants with their vaccines up to date
					- siab_visits_acs.csv: dataset with counts of household visits by community health agents
					- siab_visits_doctors.csv: dataset with counts of household visits by doctors
					- siab_visits_nurses.csv: dataset with counts of household visits by nurses
				- other: folder with datasets from other online sources:
					- basedosdados_cgu_audits.csv: dataset on the random audits done by the federal agency CGU
					- basedosdados_municipality_covariates.csv: dataset with municipality and year-level covariates, building on multiple government sources
					- basedosdados_municipality_humandevelopment.csv: dataset with municipality and year-level human development covariates, building on the United Nations' Human Development Atlas
					- basedosdados_municipality_identifiers.csv: dataset with municipality identifiers
					- ibge_municipality_area.csv: dataset with geographic area of each municipality, from the site of Brazil's statistics office (IBGE)
					- mpsp_news.csv: dataset with news from the site of the São Paulo Prosecutor's Office published at https://mpsp.mp.br/busca?q=%22ex-prefeito%22
	- plots: folder to store the plots produced by the code in the analyze_data folder.
		- plots_go_here.txt: TXT file explaining this is the folder where plots generated by the code are stored.
	- readme.txt (this file): TXT file with an overview of the replication package.
	- tables: folder to store the tables produced by the code in the analyze_data folder.
		- tables_go_here.txt: TXT file explaining this is the folder where tables generated by the code are stored.

Below are instructions on how to download files obtained from other sources (and stored under datasets > downloaded) as well as their full citations. These instructions are functional as of June 2022. 

	BASE DOS DADOS files
		These files (whose name starts with basedosdados) are downloaded from BASE DOS DADOS, a civil society repository of data on Brazil.
		The datasets can be accessed in a variety of ways from their site https://basedosdados.org/.
		The easiest way to access these files is using SQL syntax in their Google BigQuery. To do so, you must have a Google account. Then, queries can be entered here: https://console.cloud.google.com/bigquery?p=basedosdados.
	
		basedosdados_cgu_audits.csv
			This file contains data on the randomized audits performed by the federal comptroller's office (CGU, Controladora Geral da União).
			To download the file, copy the following syntax in BigQuery and press "RUN"
				SELECT* FROM `basedosdados.br_cgu_fef.microdados`
			Once the file is generated, click on "SAVE RESULTS" and then "CSV (local file)"
			Locate the file in your hard drive, rename it as "basedosdados_cgu_audits.csv", and place it under datasets > downloaded > other
			Full citation: Base dos Dados. CGU audit data. https://basedosdados.org/
		
		basedosdados_municipality_covariates.csv
			This file contains municipal-level covariates from several administrative sources (IBGE, the Brazilian Institute for Geography and Statistics; and the Ministry of Health)
			To download the file, copy the following syntax in BigQuery and press "RUN"
				SELECT
					pib.id_municipio as ibge,
					pib.PIB as gdp,
					pop.ano as year,
					pop.populacao as population,
					pib.PIB / pop.populacao as gdppercapita,
					sim.numero_obitos as deaths,
					sim.numero_obitos / pop.populacao *1000 as deaths_perthousand,
				FROM `basedosdados.br_ibge_pib.municipio` as pib
				LEFT JOIN `basedosdados.br_ibge_populacao.municipio` as pop
				ON pib.id_municipio = pop.id_municipio AND pib.ano = pop.ano
				LEFT JOIN `basedosdados.br_ms_sim.municipio` as sim
				ON pib.id_municipio = sim.id_municipio AND pib.ano = sim.ano
			Once the file is generated, click on "SAVE RESULTS" and then "CSV (local file)"
			Locate the file in your hard drive, rename it as "basedosdados_municipality_covariates.csv", and place it under datasets > downloaded > other
			Full citation: Base dos Dados. Municipality covariates data. https://basedosdados.org/

		basedosdados_municipality_development_index.csv
			This file contains municipal-level human development indicators as collected by the United Nations' Atlas of Human Development. 
			To download the file, copy the following syntax in BigQuery and press "RUN"
				SELECT
				atlas.id_municipio as ibge,
				atlas.ano as year,
				atlas.idhm as human_development_index,
				FROM `basedosdados.mundo_onu_adh.municipio` as atlas
			Once the file is generated, click on "SAVE RESULTS" and then "CSV (local file)"
			Locate the file in your hard drive, rename it as "basedosdados_municipality_development_index.csv", and place it under datasets > downloaded > other
			Full citation: Base dos Dados. Municipality human development index. https://basedosdados.org/

		basedosdados_municipality_identifiers.csv
			This file contains municipality identifiers
			To download the file, copy the following syntax in BigQuery and press "RUN"
				SELECT
				id_municipio, id_municipio_6, id_municipio_tse
				FROM `basedosdados.br_bd_diretorios_brasil.municipio` as diretorios
			Once the file is generated, click on "SAVE RESULTS" and then "CSV (local file)"
			Locate the file in your hard drive, rename it as "basedosdados_municipality_identifiers.csv", and place it under datasets > downloaded > other
			Full citation: Base dos Dados. Municipality identifiers data. https://basedosdados.org/

	CNES files
		These files correspond to the personnel counts from the National Registry of Healthcare Establishments.
		These files can be downloaded from the DATASUS site, https://datasus.saude.gov.br/.
		To access DATASUS, you may need to visit the website from a Brazilian IP address (use a VPN if outside Brazil)

		cnes_personnel_all_2007-15.csv
			This file has the count of healthcare personnel in municipal health establishments from 2007 to 2015.
			This file is produced and published by DATASUS.
			To download the file, go to datasus.gov.br, then scroll down and click on TABNET
			Click "Rede assistencial"
			Click "CNES – Recursos Humanos a partir de agosto de 2007 – Ocupações classificadas pela CBO 2002"
			Click "Ocupações" and then select "Brasil por Região, UF e Município" below
			Select "Município" under Linha, "Ano/mês compet." under Coluna, "Quantidade" under Conteúdo, and Aug/2015 until Aug/2007 under "PERÍODOS DISPONÍVEIS".
			Further down, under "Esfera administrativa" select "Municipal" (this applies until 2015)
			Select "Tabela com bordas" under Formato, and click "Mostra"
			Wait for the whole table to load. Then scroll down and click "COPIA COMO .CSV"
			Rename that file as "cnes_personnel_all_2007-15.csv" and place it under "datasets/downloaded"
			Full citation: CNES. Recursos humanos. DATASUS, https://datasus.saude.gov.br/.

		cnes_personnel_all_2015-21.csv
			This file has the count of healthcare personnel in municipal health establishments from 2007 to 2015.
			This file is produced and published by DATASUS.
			To download the file, go to datasus.gov.br, then scroll down and click on TABNET
			Click "Rede assistencial"
			Click "CNES – Recursos Humanos a partir de agosto de 2007 – Ocupações classificadas pela CBO 2002"
			Click "Ocupações" and then select "Brasil por Região, UF e Município" below
			Select "Município" under Linha, "Ano/mês compet." under Coluna, "Quantidade" under Conteúdo, and Aug/2015 until Aug/2007 under "PERÍODOS DISPONÍVEIS".
			Further down, under "Esfera jurídica" select "Administração Pública Municipal" (which applies from 2015 onward)
			Select "Tabela com bordas" under Formato, and click "Mostra"
			Wait for the whole table to load. Then scroll down and click "COPIA COMO .CSV"
			Rename that file as "cnes_personnel_all_2015-21.csv" and place it under "datasets/downloaded"
			Full citation: CNES. Recursos humanos. DATASUS, https://datasus.saude.gov.br/.

	IBGE files
		This file is downloaded from the site of IBGE, the Instituto Brasileiro de Geografia e Estatística (a federal government agency).
		The file can be downloaded from the IBGE site, https://www.ibge.gov.br/.
		
		ibge_municipality_area.csv
			This file corresponds to the geographic area of each municipality in Brazil.
			The file is produced and published by IBGE.
			To download the file, go to https://www.ibge.gov.br/geociencias/organizacao-do-territorio/estrutura-territorial/15761-areas-dos-municipios.html
			Click on "xls"
			Place that file under data > downloaded > ibge, and rename it as ibge_municipality_area.csv
			Full citation: IBGE. 2019. Áreas Territoriais. https://www.ibge.gov.br/geociencias/organizacao-do-territorio/estrutura-territorial/15761-areas-dos-municipios.html
	RAIS files
		RAIS files correspond to the identified or anonymized data for all formal labor contracts in Brazil.
		These files are produced and published by the Ministry of Labor.
		The identified version of the datasets are restricted-access and can only be used by individuals with an agreement with the Brazilian government.
		The anonymized version of the files is open-accessed but cannot be redistributed. Below are the instructions to download them. 
		The anonymized version of the files can be downloaded from the Brazilian government server: ftp://ftp.mtps.gov.br/pdet/microdados/rais/.
		To access the server it is typically required to use a Brazilian IP address, so you may need a VPN if you are outside Brazil
		Download all the files in the folder for the years 2004, 2005, 2008, 2009, 2012, 2013, 2016 and 2017, and unzip them
		Place those files under datasets > downloaded > employment > rais_original
		Each RAIS folder corresponds to a year, which has separate files for each state. Each state file has one line for every contract in the formal labor market.
		Full citation: Ministério do Trabalho. 2017. Relação Anual de Informações Sociais. 

		rais_municipal_employees_2004.csv
			This file contains anonymized, contract-level micro data on all municipal employees in 2004.
			The file is built with the code in "prepare_data_employment.R", using the anonymized version of RAIS which can be downloaded using the instructions above.

		rais_municipal_employees_2005.csv
			This file contains anonymized, contract-level micro data on all municipal employees in 2005.
			The file is built with the code in "prepare_data_employment.R", using the anonymized version of RAIS which can be downloaded using the instructions above.

		rais_municipal_employees_2008.csv
			This file contains anonymized, contract-level micro data on all municipal employees in 2008.
			The file is built with the code in "prepare_data_employment.R", using the anonymized version of RAIS which can be downloaded using the instructions above.

		rais_municipal_employees_2009.csv
			This file contains anonymized, contract-level micro data on all municipal employees in 2009.
			The file is built with the code in "prepare_data_employment.R", using the anonymized version of RAIS which can be downloaded using the instructions above.

		rais_municipal_employees_2012.csv
			This file contains anonymized, contract-level micro data on all municipal employees in 2012.
			The file is built with the code in "prepare_data_employment.R", using the anonymized version of RAIS which can be downloaded using the instructions above.

		rais_municipal_employees_2013.csv
			This file contains anonymized, contract-level micro data on all municipal employees in 2013.
			The file is built with the code in "prepare_data_employment.R", using the anonymized version of RAIS which can be downloaded using the instructions above.

		rais_municipal_employees_2016.csv
			This file contains anonymized, contract-level micro data on all municipal employees in 2016.
			The file is built with the code in "prepare_data_employment.R", using the anonymized version of RAIS which can be downloaded using the instructions above.

		rais_municipal_employees_2017.csv
			This file contains anonymized, contract-level micro data on all municipal employees in 2017.
			The file is built with the code in "prepare_data_employment.R", using the anonymized version of RAIS which can be downloaded using the instructions above.

	SIAB files
		SIAB files correspond to the health service counts from the Basic Assistance Information System.
		These files can be downloaded from the DATASUS site, https://datasus.saude.gov.br/.
		To access DATASUS, you may need to visit the website from a Brazilian IP address (use a VPN if outside Brazil)

		siab_babies_below1yr.csv
			This file contains municipality-level counts of babies under 1 year old
			The file is produced and published by the Ministry of Health.
			To download the data, go to https://datasus.saude.gov.br/atencao-basica-saude-da-familia-de-1998-a-2015/
			Click "Situação de Saúde"
			Under "abrangência geográfica", click "Brasil por Região, UF e Município"
			Select "Município" under Linha, "Ano/Mês" under Coluna, "Crianças <1 ano" under Conteúdo, and all values under "PERÍODOS DISPONÍVEIS"
			Select "Tabela com bordas" under Formato, and click "Mostra"
			Wait for the whole table to load. Then scroll down and click "COPIA COMO .CSV"
			Rename that file as "siab_babies_below1yr.csv" and place it under "datasets/downloaded/healthcare/siab"
			Full citation: SIAB. Crianças com menos de 1 ano. DATASUS, https://datasus.saude.gov.br/.
		
		siab_births.csv
			This file contains municipality-level counts of life births.
			The file is produced and published by the Ministry of Health.
			To download the data, go to https://datasus.saude.gov.br/atencao-basica-saude-da-familia-de-1998-a-2015/
			Click "Situação de Saúde"
			Under "abrangência geográfica", click "Brasil por Região, UF e Município"
			Select "Município" under Linha, "Ano/Mês" under Coluna, "Nascidos vivos" under Conteúdo, and all values under "PERÍODOS DISPONÍVEIS".
			Select "Tabela com bordas" under Formato, and click "Mostra"
			Wait for the whole table to load. Then scroll down and click "COPIA COMO .CSV"
			Rename that file as "siab_babies_below1yr.csv" and place it under "datasets/downloaded/healthcare/siab"
			Full citation: SIAB. Nascidos vivos. DATASUS, https://datasus.saude.gov.br/.		

		siab_consultations_children.csv
			This file contains municipality-level counts of medical consultations with children older than 1 and younger than 5 years old
			The file is produced and published by the Ministry of Health.
			To download the data, go to https://datasus.saude.gov.br/atencao-basica-saude-da-familia-de-1998-a-2015/
			Click "Produção e Marcadores"
			Under "abrangência geográfica", click "Brasil por Região, UF e Município"
			Select "Município" under Linha, "Ano/Mês" under Coluna, "Cons.1a4 ano" under Conteúdo, and all values under "PERÍODOS DISPONÍVEIS".
			Select "Tabela com bordas" under Formato, and click "Mostra"
			Wait for the whole table to load. Then scroll down and click "COPIA COMO .CSV"
			Rename that file as "siab_consultations_children.csv" and place it under "datasets/downloaded/healthcare/siab"	
			Full citation: SIAB. Consultas médicas de 1 a 4 anos. DATASUS, https://datasus.saude.gov.br/.		

		siab_consultations_infants.csv
			This file contains municipality-level counts of medical consultations with children between 0 and 1 year old
			The file is produced and published by the Ministry of Health.
			To download the data, go to https://datasus.saude.gov.br/atencao-basica-saude-da-familia-de-1998-a-2015/
			Click "Produção e Marcadores"
			Under "abrangência geográfica", click "Brasil por Região, UF e Município"
			Select "Município" under Linha, "Ano/Mês" under Coluna, "Cons.<1 ano" under Conteúdo, and all values under "PERÍODOS DISPONÍVEIS".
			Select "Tabela com bordas" under Formato, and click "Mostra"
			Wait for the whole table to load. Then scroll down and click "COPIA COMO .CSV"
			Rename that file as "siab_consultations_infants.csv" and place it under "datasets/downloaded/healthcare/siab"	
			Full citation: SIAB. Consultas médicas de 0 a 1 ano. DATASUS, https://datasus.saude.gov.br/.

		siab_lifebirths_weight_below_2500g.csv
			This file contains municipality-level counts of babies born with under 2,500 grams of weight.
			The file is produced and published by the Ministry of Health.
			To download the data, go to https://datasus.saude.gov.br/atencao-basica-saude-da-familia-de-1998-a-2015/
			Click "Situação de Saúde"
			Under "abrangência geográfica", click "Brasil por Região, UF e Município"
			Select "Município" under Linha, "Ano/Mês" under Coluna, "NascVivos <2500g" under Conteúdo, and all values under "PERÍODOS DISPONÍVEIS".
			Select "Tabela com bordas" under Formato, and click "Mostra"
			Wait for the whole table to load. Then scroll down and click "COPIA COMO .CSV"
			Rename that file as "siab_lifebirths_weight_below_2500g.csv" and place it under "datasets/downloaded/healthcare/siab"	
			Full citation: SIAB. Nascidos vivos com menos de 2500 gramas. DATASUS, https://datasus.saude.gov.br/.	

		siab_pregnancies_vaccinations.csv
			This file contains municipality-level counts of pregnant women with their vaccines up to date
			The file is produced and published by the Ministry of Health.
			To download the data, go to https://datasus.saude.gov.br/atencao-basica-saude-da-familia-de-1998-a-2015/
			Click "Situação de Saúde"
			Under "abrangência geográfica", click "Brasil por Região, UF e Município"
			Select "Município" under Linha, "Ano/Mês" under Coluna, "Gest.c/Vacina Dia" under Conteúdo, and all values under "PERÍODOS DISPONÍVEIS".
			Select "Tabela com bordas" under Formato, and click "Mostra"
			Wait for the whole table to load. Then scroll down and click "COPIA COMO .CSV"
			Rename that file as "siab_pregnancies_vaccinations.csv" and place it under "datasets/downloaded/healthcare/siab"	
			Full citation: SIAB. Gestantes com vacinação ao dia. DATASUS, https://datasus.saude.gov.br/.			

		siab_prenatal.csv
			This file contains municipality-level counts of prenatal care check-ups
			The file is produced and published by the Ministry of Health.
			To download the data, go to https://datasus.saude.gov.br/atencao-basica-saude-da-familia-de-1998-a-2015/
			Click "Produção e Marcadores"
			Under "abrangência geográfica", click "Brasil por Região, UF e Município"
			Select "Município" under Linha, "Ano/Mês" under Coluna, "Gest.c/Vacina Dia" under Conteúdo, and all values under "PERÍODOS DISPONÍVEIS".
			Select "Tabela com bordas" under Formato, and click "Mostra"
			Wait for the whole table to load. Then scroll down and click "COPIA COMO .CSV"
			Rename that file as "siab_prenatal.csv" and place it under "datasets/downloaded/healthcare/siab"	
			Full citation: SIAB. Atendimentos de pré-natal. DATASUS, https://datasus.saude.gov.br/.	

		siab_vaccinations_0-1.csv
			This file contains municipality-level counts of infants with their vaccines up to date
			The file is produced and published by the Ministry of Health.
			To download the data, go to https://datasus.saude.gov.br/atencao-basica-saude-da-familia-de-1998-a-2015/
			Click "Situação de Saúde"
			Under "abrangência geográfica", click "Brasil por Região, UF e Município"
			Select "Município" under Linha, "Ano/Mês" under Coluna, "Cr<1a c/Vacin.dia" under Conteúdo, and all values under "PERÍODOS DISPONÍVEIS".
			Select "Tabela com bordas" under Formato, and click "Mostra"
			Wait for the whole table to load. Then scroll down and click "COPIA COMO .CSV"
			Rename that file as "siab_pregnancies_vaccinations.csv" and place it under "datasets/downloaded/healthcare/siab"	
			Full citation: SIAB. Crianças com menos de 1 ano com vacinação ao dia. DATASUS, https://datasus.saude.gov.br/.

		siab_visits_acs.csv
			This file contains municipality-level counts of household visits by community health agents
			The file is produced and published by the Ministry of Health.
			To download the data, go to https://datasus.saude.gov.br/atencao-basica-saude-da-familia-de-1998-a-2015/
			Click "Situação de Saúde"
			Under "abrangência geográfica", click "Brasil por Região, UF e Município"
			Select "Município" under Linha, "Ano/Mês" under Coluna, "Nº Visitas" under Conteúdo, and all values under "PERÍODOS DISPONÍVEIS".
			Select "Tabela com bordas" under Formato, and click "Mostra"
			Wait for the whole table to load. Then scroll down and click "COPIA COMO .CSV"
			Rename that file as "siab_visits_acs.csv" and place it under "datasets/downloaded/healthcare/siab"	
			Full citation: SIAB. Nº de visitas domicilares por agentes comunitários de saúde. DATASUS, https://datasus.saude.gov.br/.	

		siab_visits_doctors.csv
			This file contains municipality-level counts of household visits by community health agents
			The file is produced and published by the Ministry of Health.
			To download the data, go to https://datasus.saude.gov.br/atencao-basica-saude-da-familia-de-1998-a-2015/
			Click "Produção e Marcadores"
			Under "abrangência geográfica", click "Brasil por Região, UF e Município"
			Select "Município" under Linha, "Ano/Mês" under Coluna, "Visita Médico" under Conteúdo, and all values under "PERÍODOS DISPONÍVEIS".
			Select "Tabela com bordas" under Formato, and click "Mostra"
			Wait for the whole table to load. Then scroll down and click "COPIA COMO .CSV"
			Rename that file as "siab_visits_doctors.csv" and place it under "datasets/downloaded/healthcare/siab"	
			Full citation: SIAB. Nº de visitas domicilares por médicos. DATASUS, https://datasus.saude.gov.br/.	

		siab_visits_nurses.csv
			This file contains municipality-level counts of household visits by community health agents
			The file is produced and published by the Ministry of Health.
			To download the data, go to https://datasus.saude.gov.br/atencao-basica-saude-da-familia-de-1998-a-2015/
			Click "Produção e Marcadores"
			Under "abrangência geográfica", click "Brasil por Região, UF e Município"
			Select "Município" under Linha, "Ano/Mês" under Coluna, "Visita Enferm." under Conteúdo, and all values under "PERÍODOS DISPONÍVEIS".
			Select "Tabela com bordas" under Formato, and click "Mostra"
			Wait for the whole table to load. Then scroll down and click "COPIA COMO .CSV"
			Rename that file as "siab_visits_nurses.csv" and place it under "datasets/downloaded/healthcare/siab"	
			Full citation: SIAB. Nº de visitas domicilares por enfermeiros. DATASUS, https://datasus.saude.gov.br/.	

	TSE FILES
		This file is downloaded from the site of Brazil's Supreme Electoral Court or TSE (Tribunal Supremo Eleitoral)
		The file is downloaded and organized using the "electionsBR" R package.

		tse_elections_2000_to_2016.RData
			This file contains all the datasets corresponding to municipal candidates and elections from 2000 to 2016
			The file is produced by the "electionsBR" package, using the data released by TSE.
			To download this file, run the following code in R:
				library(electionsBR) # install before if necessary
				d16 <- candidate_local(year=2016)
				d12 <- candidate_local(year=2012)
				d08 <- candidate_local(year=2008)
				d04 <- candidate_local(year=2004)
				d00 <- candidate_local(year=2000)
				v16 <- vote_mun_zone_local(year=2016)
				v12 <- vote_mun_zone_local(year=2012)
				v08 <- vote_mun_zone_local(year=2008)
				v04 <- vote_mun_zone_local(year=2004)
				v00 <- vote_mun_zone_local(year=2000)
				save.image(file = "../../datasets/downloaded/tse/tse_elections_2000_to_2016.RData")
			Full citation: Meireles, Fernando; Silva, Denisson; Costa, Beatriz. (2016). electionsBR: R functions to download and clean Brazilian electoral data. URL: http://electionsbr.com/
	


